package com.itheima.bos.quartz;

import java.util.Date;

import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.springframework.beans.factory.annotation.Autowired;

import com.itheima.bos.service.take_delivery.PromotionService;
	/*
	 * 宣传活动自动过期功能
	 */
public class PromotionJob implements Job{
	
	@Autowired
	private PromotionService promotionService;

	@Override
	public void execute(JobExecutionContext context) throws JobExecutionException {
		
		System.out.println("定时查询并修改宣传活动的方法执行....");
		promotionService.updatePromotionStauts(new Date());
		
	}


}
